var theUser = {
    "cellphone": "11111111111",
    "password": "admin"
};

exports.login = function (request, done, user) {
    if (!user) {
        request.post('/bookserver/user/login')
            .send(theUser)
            .expect(200, function (err, res) {
                if (err) {
                    throw err;
                }
                done(res);
            });
    } else {
        request.post('/bookserver/user/login')
            .send(user)
            .expect(200, function (err, res) {
                if (err) {
                    throw err;
                }
                done(res);
            });
    }

};